<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="../../css/mui.css"/>
		<link href="../../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="../../css/general.css"/>
		<style type="text/css">
			.main{
				width: 100%;
				
			}
			.listdiv{
				width: 100%;
				padding: 0.5em;
				margin: 0.5em 0;
				background-color: white;
			}
			.listdiv>div{
				display: flex;
				justify-content: space-between;
				align-items: center;
				width: 100%;
			}	
			.listdiv>div>span{
				padding: 0.2em;
			}	
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav hbg">
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left colorw"></a>
		    <h1 class="mui-title">预约列表</h1>
		</header>
		<div class="mui-content">
		    <div class="main" id="listid">
		    	<!--
                	作者：592176224@qq.com
                	时间：2019-01-23
                	描述：
                
		    	<div class="listdiv">
		    		<div class="fe09">
		    			<span id="">
		    				洗剪吹
		    			</span>
		    			<span id="">
		    				￥135
		    			</span>
		    		</div>
		    		<div class="fe09">
		    			<span id="">
		    				2018-12-12 至2019-12-12
		    			</span>
		    			<span id="">
		    			</span>
		    		</div>
		    	</div>
		    	-->
		    </div>
		</div>
		<script src="../../js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../js/mui.min.js"></script>
		<script src="../../js/req.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../js/muishow.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			window.onload = function(){
				
				mui.init();
				getappointment();
				
			}
			
			function getappointment(){
				var data = {
					url:"/api/appointment/lst",
					data:{access_token:acctoken()}
				}
				ajax(data,function(res){
					console.log(res);
					setlist(res.data.data);
				})
			}
			
			function setlist(data){
				var str = "";
				if(data.length > 0 ){
					for(var i = 0; i < data.length;i++){
						str += '<div class="listdiv"><div class="fe09"><span id="">'+
			    				data[i].product_name+
			    			'</span><span id="">'+
			    				data[i].appointment_type+
			    			'</span></div><div class="fe09"><span id="">'+
			    			data[i].end_time+
			    			'</span><span id=""></span></div></div>';
					}
				}else{
					str = '<div class="nolistdiv">暂无预约</div>'
				}
				
				g('listid').innerHTML = str;
				
			}
		</script>
	</body>

</html>